<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%@ page contentType="text/html;charset=utf-8" %>
<%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean"%> 
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <base href="<%=basePath%>">
    
    <title><bean:message key="message"/></title>
    
	<meta http-equiv="pragma" content="no-cache">
	<meta http-equiv="cache-control" content="no-cache">
	<meta http-equiv="expires" content="0">    
	<LINK href="styles/stylewang.css"  type=text/css rel=stylesheet>

  </head>
  
  <body>
  <%
  	HashMap map=(HashMap)request.getAttribute("message");
  	String sender=(String)map.get("sender");
  	String sender1=java.net.URLEncoder.encode(sender,"utf-8");
  	String image=(String)map.get("image");
  	String[] images=image.split(",");
   %>
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
    	<tr>
    		<td id="btleftbian"><bean:message key="message.sender"/>:</td>
    		<td id="rightcenter"><%=map.get("sender") %></td>
    	</tr>
    	<tr><td id="btleftbian"><bean:message key="message.title"/>:</td><td id="rightcenter"><%=map.get("title") %>&nbsp;</td></tr>
    	<tr><td id="btleftbian"><bean:message key="message.time"/>:</td><td id="rightcenter"><%=map.get("date") %>&nbsp;</td></tr>
    	<tr><td id="btleftbian"><bean:message key="message.content"/>:</td><td id="rightcenter"><%=map.get("content") %>&nbsp;</td></tr>
    	<tr><td id="btleftbian"><bean:message key="message.image"/>:</td>
    	
    	<td id="rightcenter">&nbsp;<%if(image!=null && !image.equals("")){
    		for(int i=0;i<images.length;i++){%><img width="100px" height="100px" src="<%=path%>/message/image/<%=images[i] %>" onClick="window.open('<%=basePath %>/message/image/<%=images[i] %>',null,'top=150,left=150,scrollbars=yes,dialog=yes,modal=yes,width=520,height=620,resizable=yes')"></td>
    	<%} }%></tr>
		<tr><Td id="tdtop" colspan="2">&nbsp;</Td></tr>
    </table><div align="center">
    <input type="button" value="<bean:message key="close"/>" onClick="window.close();">
    <input type="button" value="<bean:message key="message.reply"/>" onclick="window.location.href='<%=path %>/message/send.jsp?receiver=<%=sender1 %>';"><div>
  </body>
</html>
